﻿using FreeSql.DataAnnotations;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ZoneLinePacking.Attributes;
using ZoneLinePacking.Models.Entity.StationResult;

namespace ZoneLinePacking.Models.StationResult.HOPStation {
    /// <summary>
    /// 上支撑螺母拧紧工位
    /// </summary>
    /// <remarks>
    /// <para>StationCode：OP640</para>
    /// <para>IP：192.168.10.25</para>
    /// </remarks>
    [Index("{tablename}_uk_code", nameof(Code), IsUnique = true)]
    public class HOP040StationResult : StationResultBase {

        private float _tigtenTorque;
        /// <summary>
        /// 拧紧力矩
        /// </summary>
        [DgColumnAttr("拧紧力矩")]
        public float TigtenTorque {
            get { return _tigtenTorque; }
            set => SetProperty(ref _tigtenTorque, value);
        }

        private float _tigtenAngle;
        /// <summary>
        /// 拧紧角度
        /// </summary>
        [DgColumnAttr("拧紧角度")]
        public float TigtenAngle {
            get { return _tigtenAngle; }
            set => SetProperty(ref _tigtenAngle, value);
        }

        private float _threadLength;
        /// <summary>
        /// 螺纹长度
        /// </summary>
        [DgColumnAttr("螺纹长度")]
        public float ThreadLength {
            get { return _threadLength; }
            set => SetProperty(ref _threadLength, value);
        }


        private float _pressPosition;
        /// <summary>  
        /// 压机位置  
        /// </summary>  
        [DgColumnAttr("压机位置")]
        public float PressPosition {
            get { return _pressPosition; }
            set { SetProperty(ref _pressPosition, value); }
        }

        private float _pressForce;
        /// <summary>  
        /// 压机压力  
        /// </summary>  
        [DgColumnAttr("压机压力")]
        public float PressForce {
            get { return _pressForce; }
            set { SetProperty(ref _pressForce, value); }
        }

        private string _result2;
        /// <summary>  
        /// 结论  
        /// </summary>  
        [DgColumnAttr("结论2")]
        public string Result2 {
            get { return _result2; }
            set { SetProperty(ref _result2, value); } // 假设 SetProperty 方法存在  
        }

        #region 批次码追溯

        private string _nutScanCode;
        /// <summary>
        /// 螺母批次码
        /// </summary>
        [DgColumnAttr("螺母批次码")]
        public string NutScanCode {
            get { return _nutScanCode; }
            set => SetProperty(ref _nutScanCode, value);
        }

        private string _upwardSupportScanCode;
        /// <summary>
        /// 上支撑批次码
        /// </summary>
        [DgColumnAttr("上支撑批次码")]
        public string UpwardSupportScanCode {
            get { return _upwardSupportScanCode; }
            set => SetProperty(ref _upwardSupportScanCode, value);
        }

        private string _bufferBlockScanCode;
        /// <summary>
        /// 缓冲块批次码
        /// </summary>
        [DgColumnAttr("缓冲块批次码")]
        public string BufferBlockScanCode {
            get { return _bufferBlockScanCode; }
            set => SetProperty(ref _bufferBlockScanCode, value);
        }

        private string _dustCoverScanCode;
        /// <summary>
        /// 防尘罩批次码
        /// </summary>
        [DgColumnAttr("防尘罩批次码")]
        public string DustCoverScanCode {
            get { return _dustCoverScanCode; }
            set => SetProperty(ref _dustCoverScanCode, value);
        }

        private string _dustCapScanCode;
        /// <summary>
        /// 防尘盖批次码
        /// </summary>
        [DgColumnAttr("防尘盖批次码")]
        public string DustCapScanCode {
            get { return _dustCapScanCode; }
            set => SetProperty(ref _dustCapScanCode, value);
        }

        private string _labelScanCode;
        /// <summary>
        /// 标签纸批次码
        /// </summary>
        [DgColumnAttr("标签纸批次码")]
        public string LabelCapScanCode {
            get { return _labelScanCode; }
            set => SetProperty(ref _labelScanCode, value);
        }

        #endregion

    }

}
